package com.xggstudio.crm.ui.mvp.v.pop;

import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.PopupWindow;

public abstract class BasePopWindow extends PopupWindow {

    public View view;

    protected abstract int getLayout();

    protected abstract void init(Context context,View v);

    public BasePopWindow(Context context,View v) {

        this.view = LayoutInflater.from(context).inflate(getLayout(),null);
        init(context, v);

        setContentView(view);
        setWindowLayoutMode(WindowManager.LayoutParams.MATCH_PARENT,WindowManager.LayoutParams.WRAP_CONTENT);
        setBackgroundDrawable(new ColorDrawable((Color.WHITE)));
        setOutsideTouchable(true);
        //setTouchable(true);
    }


}
